from nlp_tools.tasks.abs_task_model import ABCTaskModel

import pandas as pd

df_test = pd.read_csv("/home/qiufengfeng/nlp/competition/datagrand/基于大规模预训练模型的风险事件标签识别/datagrand_2021_test.csv")
train_model_path = './train_model'
model = ABCTaskModel.load_model(train_model_path)
y_pred = model.predict(df_test['text'].tolist())
pd.DataFrame({"id": df_test['id'], "label": y_pred}).to_csv("submission.csv", index=False)
